//
//  FLUTabBarController.m
//  ProjectDemo
//
//  Created by IOS3 on 2018/10/24.
//  Copyright © 2018 IOS3. All rights reserved.
//

#import "FLUTabBarController.h"
#import "FLUNavigationController.h"
#import "TestFirstViewController.h"
#import <HBDNavigationController.h>

@interface FLUTabBarController ()

@end

@implementation FLUTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    
//    UIStackView;  
    
    TestFirstViewController *first = [[TestFirstViewController alloc] init];
    FLUNavigationController *firstNav = [[FLUNavigationController alloc] initWithRootViewController:first];
    firstNav.tabBarItem.title = @"首页";
    [self addChildViewController:firstNav];
}

//- (BOOL)shouldAutorotate {
//    return [[self topViewController:self] shouldAutorotate];
//}
//- (UIViewController *)topViewController:(UIViewController *)controller {
//    while (controller.presentedViewController) {
//        controller = controller.presentedViewController;
//    }
//    if ([controller isKindOfClass:[UINavigationController class]]) {
//        UINavigationController *nav = (UINavigationController *)controller;
//        controller = nav.topViewController;
//        [self topViewController:controller];
//    }
//    if ([controller isKindOfClass:[UITabBarController class]]) {
//        UITabBarController *tab = (UITabBarController *)controller;
//        controller = tab.selectedViewController;
//        [self topViewController:controller];
//    }
//    return controller;
//}



@end
